using System.Collections;
using System;
using UnityEngine;
/////////////////////
///Perlin工具
/////////////////////
public class PerlinTool{
	public Perlin noise = new Perlin();
	///////////////////////////
	///生成随时间的偏移
	///////////////////////////
	public Vector3 GetOffsetWithTime(float speed,Vector3 position){
		float timex = Time.time * speed * 0.1365143f;
		float timey = Time.time * speed * 1.21688f;
		float timez = Time.time * speed * 2.5564f;
		
		return new Vector3(
			noise.Noise(timex + position.x,timex + position.y,timex + position.z),
			noise.Noise(timey + position.x,timey + position.y,timey + position.z),
			noise.Noise(timez + position.x,timez + position.y,timez + position.z)
		);
	}
}